Websydian v6.1 online documentationOnline documentation - WebsydianExpress v3.5

WebsydianExpress Basic Development Tasks

Create a page

Source Object Verb Target Object
MyPageGenerator is a FNC PageGeneratorForProcess

Create a grid (list) page

Source Object Verb Target Object
MyPageGenerator is a FNC WebGridPageForProcess
MyPageGenerator replaces VW

...by VW

UIBasic.Grid

MyEnt.MyView

MyPage replaces FNC

...by FNC

UIBasic.Grid.BlockFetch

MyEnt.MyView.MyBlockFetch

This creates a page with a details region, a grid region, a Position event (button), and a Next event.

If you don’t want to have the two events, you can inherit from GridPageForProcess.

The MyEnt.MyView view defines the ordering of the records in the grid and the fields shown in the grid.

MyBlockFetch is the function that actually retrieves the data from the table.

Generate a template for a page

Run the scoped _DocumentTemplateGenerator for the PageGenerator (after creating all definitions for the page).

After creating the template, remember to move it to the folder where WebsydianExpress reads its templates for the site you want to deploy the page in.

Add a detail output field to a page

Source Object Verb Target Object
MyPageGenerator local FLD

...for VAR

MyField

WsyDetails

Assign a value to the detail field

In the action diagram of the PageGenerator, specify a value for the field WsyDetails<MyField>. This is commonly done in the edit point "0 Process input".

Add an entire view as detail fields

Source Object Verb Target Object
MyPageGenerator local VW

...for VAR

MyEnt.MyView

WsyDetails

This adds all the fields in the view to the WsyDetails variable. If you want to omit some fields, you can do it like this:

Source Object Verb Target Object
MyPageGenerator local VW

...for VAR

...omits FLD

MyEnt.MyView

WsyDetails

MyField

Hide a detail output field

Source Object Verb Target Object
MyPageGenerator local FLD

...for VAR

MyField

OmitDetailsFields

MyField will still be in the WsyDetails variable, and you can assign values to it. However, the template generator will not create HTML that will show the value to the user.

In many cases you will do this if the field is an input field for a button (an event - see below).

Add a grid output field to a page

Source Object Verb Target Object
MyPageGenerator local FLD

...for VAR

MyField

WsyGrid

In most cases you will add fields to a grid by replacing the UIBasic.Grid view on a WebGridPageForProcess. However, in some cases you want to add additional fields to the grid - this can be done by adding each field to the WsyGrid variable.

Specify a value for a grid field

The fields that are specified in the view that replaces UIBasic.grid will normally be populated by the BloackFetch function.

Any fields that are not part of the output must be populated in the action diagram, edit point “0 Load fields in Grid” by assigning a value to WsyGrid<MyField>.

This edit point is reached once for each record retrieved by the BlockFetch function.

When the edit point is reached, the WsyGrid variable has already been populated with the output of the BlockFetch function.

Hide a grid output field

Source Object Verb Target Object
MyPageGenerator local FLD

...for VAR

MyField

OmitGridFields

This is commonly done when the field has been added as part of the replacement of the UIBasic.Grid view on the WebGridPageForProcess - and you don't want to show the field to the user (e.g. surrogate keys).

This can also be done when the field is an input field for a grid event.

Add a detail button to a page

Source Object Verb Target Object
MyEventHandler is a FNC EventHandlerForProcess
MyPage includes FNC

or

comprises FNC

MyEventHandler

Both the comprises and the includes triple add a button to the detail region of the page.

MyEventHandler is the function that will be called when the button is pressed.

Add a grid button to a page

Source Object Verb Target Object
MyGridEventHandler is a FNC EventHandlerForProcess
MyGridEventHandler option NME

...value SYS

WSYD Grid event

Yes

MyPage includes FNC

or

comprises FNC

MyGridEventHandler

This adds a button to each grid row. MyGridEventHandler is the function that will be called when the button is pressed.

The WSYD Grid Event option determines whether the button is placed in the grid region (value: Yes) or in the detail region (value: no or if the options isn't defined).

Add an inputfield to a detail button

Source Object Verb Target Object
MyEventHandler local FLD

...for VAR

MyField

WebInput

When the button is pressed, the EventHandler will be called. The local field WebInput<MyField> will contain the value specified in the input field (in the browser).

Assign an initial value to the input field

If you want to be able to show an initial value for the field you have to add the following triples to the PageGenerator:

Source Object Verb Target Object
MyPageGenerator local FLD

...for VAR

MyField

WsyDetails

MyPageGenerator local FLD

...forVAR

MyField

OmitDetailsFields

You assign an initial value to the input field by specifying the value for the local field WsyDetails<MyField> (often in the "0 Process input" edit point).

Add an inputfield to a grid button

Source Object Verb Target Object
MyGridEventHandler local FLD

...for VAR

MyField

WebInput

When the button is pressed, the EventHandler will be called. The local field WebInput<MyField> will contain the value specified in the input field (in the browser).

Assign an initial value to the input field

In some cases, field will already be part of the WsyGrid variable (from the replacement of the UIBasic.Grid view). If it is, you will not have to add it to the WsyGrid variable.

If you want to be able to show an initial value for the field you have to add the following triples to the PageGenerator:

Source Object Verb Target Object
MyPageGenerator local FLD

...for VAR

MyField

WsyGrid

MyPageGenerator local FLD

...forVAR

MyField

OmitGridFields

You assign an initial value to the input field by specifying the value for the local field WsyGrid<MyField> (often in the "0 Load fields in Grid" edit point).

Add a hidden field to a detail event

Source Object Verb Target Object
MyEventHandler local FLD

...for VAR

MyField

WebInput

MyEventHandler local FLD

...for VAR

MyField

Hidden

MyPageGenerator local FLD

...for VAR

MyField

WsyDetails

MyField will not be shown as an input field for the button. When the button is pressed, the value specified in the local field WsyDetails<MyField> (in the PageGenerator) will be transmitted as part of the request. MyEventHandler will be called, and the value will be available in the local field WebInput<MyField>.

Note that when you add a field to the Hidden variable of your EventHandler, you must generate and build all PageGenerators that either include or comprise this EventHandler.

If you don't want the field to be shown as an output field, add the triple:

Source Object Verb Target Object
MyPageGenerator local FLD

...for VAR

MyField

OmitDetailsFields

Add a hidden field to a grid event

Source Object Verb Target Object
MyGridEventHandler local FLD

...for VAR

MyField

WebInput

MyGridEventHandler local FLD

...for VAR

MyField

Hidden

MyPageGenerator local FLD

...for VAR

MyField

WsyGrid

MyField will not be shown as an input field for the button. When the button is pressed, the value specified in the local field WsyGrid<MyField> for the record the button is placed in will be transmitted as part of the request. MyEventHandler will be called, and the value will be available in the local field WebInput<MyField>.

Note that when you add a field to the Hidden variable of your EventHandler, you must generate and build all PageGenerators that either include or comprise this EventHandler.

If you don't want the field to be shown as an output field, add the triple:

Source Object Verb Target Object
MyPageGenerator local FLD

...for VAR

MyField

OmitGridFields

Create function to call when a menu item is pressed

Source Object Verb Target Object
MyProcessEntryPoint is a FNC ProcessEntryPoint

In the edit point "Call to first PageGenerator" add a call to the first page to show when the menu item is pressed.

After creating the ProcessEntrypoint, you have to define it as a content loader in the administration interface and add it to a menu in the site structure.

Example Pages

Detail Page

Grid Page